<template>
<div>
  <van-tabbar
  active-color="#FF734C"
  route
  >
  <van-tabbar-item
  to="/home"
  icon-prefix="icon" icon="shouye9">首页</van-tabbar-item>
  <van-tabbar-item
  to="/class"
  icon-prefix="icon" icon="chazhaobiaodanliebiao">分类</van-tabbar-item>
  <van-tabbar-item
  to="/cart"
  icon-prefix="icon" icon="gouwuchekong" :badge="count">购物车</van-tabbar-item>
  <van-tabbar-item
  to="/user"
  icon-prefix="icon" icon="xiaolian">我的</van-tabbar-item>
</van-tabbar>
</div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  data () {
    return {
      num: this.$store.state.num
    }
  },
  computed: {
    ...mapGetters([
      'count'
    ])
  }
}
</script>
